home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.2 KB | 155 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: PalFrame.h
- // Release Version: $ ODF 2 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PALFRAME_H
- #define PALFRAME_H
-
- // ----- OS Layer -----
-
- #ifndef FLOATFRM_H
- #include "FloatFrm.h"
- #endif
-
- #ifndef FWNOTIFR_H
- #include "FWNotifr.h"
- #endif
-
- #ifndef FWINTERE_H
- #include "FWIntere.h"
- #endif
-
- #ifndef FWCOLOR_H
- #include "FWColor.h"
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- class FW_CFacetContext;
- class FW_CColor;
- class FW_CMouseEvent;
-
- class CGrid;
- class CPaletteFrame;
-
- //========================================================================================
- // CPalette
- //========================================================================================
-
- class CPalette
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- CPalette();
- virtual ~ CPalette();
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void GetColor(short colorIndex, FW_CColor* color) const;
- short NumberOfColors() const
- {return fNumbersOfColors;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- short fNumbersOfColors;
- #ifdef FW_BUILD_MAC
- CTabHandle fColorTable;
- #endif
- #ifdef FW_BUILD_WIN
- PALETTEENTRY* fColorTable;
- #endif
- };
-
- //========================================================================================
- // CColorChangedInterest
- //========================================================================================
-
- class CColorChangedInterest: public FW_CInterest
- {
- public:
- CColorChangedInterest(FW_MNotifier* notifier);
- virtual ~CColorChangedInterest();
- };
-
- //========================================================================================
- // CColorChangedNotification
- //========================================================================================
-
- class CColorChangedNotification : public FW_CNotification
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- CColorChangedNotification(const FW_CInterest& interest,
- const FW_CColor& color,
- FW_ERenderVerbs renderVerb);
- virtual ~CColorChangedNotification();
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- FW_CColor GetColor() const
- {return fColor;}
- FW_ERenderVerbs GetRenderVerb() const
- {return fRenderVerb;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CColor fColor;
- FW_ERenderVerbs fRenderVerb;
- };
-
- //========================================================================================
- // CPaletteFrame
- //========================================================================================
-
- class CPaletteFrame : public CFloatingWindowFrame, public FW_MNotifier
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
-
- FW_DECLARE_AUTO(CPaletteFrame)
-
- CPaletteFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, FW_CPart* part);
- virtual ~ CPaletteFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
- virtual FW_Handled DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- virtual void FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CPalette* fPalette;
- CGrid *fGrid;
- };
-
- #endif
-